<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>ByteCollege云课</title>
    <!-- 新 Bootstrap4 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>

    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <style>
        body {
            background: #f9f9f9;
            font-size: 12px;
        }
        .position-relative {
            position: relative;
        }
        .banner-container form .tip {
            padding-top: 5px;
            color: hsla(0,0%,100%,.6);
        }
        .header{
            background-color: #191e29;
            border-width: 0;
        }
        .header .navbar-brand {
            padding: 0;
        }
        .header .navbar-brand img {
            height: 50px;
        }
        .header .navbar-nav>li>a {
            font-size: 16px;
        }
        .header .navbar-nav .dropdown .dropdown-menu {
            min-width: 130px;
            border-width: 0;
            text-align: center;
        }
        .header .navbar-nav .dropdown .dropdown-menu {
            background-color: #191e29;
        }
        .layout-body, .layout-side {
            padding: 0 5px;
        }
        .layout {
            min-height: 80%;
            margin-top: 70px;
            margin-bottom: 20px;
        }
        .content {
            margin-bottom: 10px;
            padding: 30px;
            background: #fff;
            border: 1px solid #eee;
        }
        .question-item>.col-md-10 {
            padding: 0;
        }
        .question-item-author {
            width: 10%;
        }
        .user-avatar {
            position: relative;
            display: inline-block;
        }
        .user-avatar .avatar img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
        }
        .question-item-summary {
            margin-top: 8px;
            color: #9b9da2;
            font-size: 13px;
        }
        .user-username {
            display: inline-block;
        }
        .side-btn {
            width: 100%;
            margin-bottom: 10px;
            padding: 14px 0;
            color: #fff;
            background: #0c9;
            font-size: 20px;
            border-radius: 0;
            border: none;
        }
        .nav-tabs {
            margin-bottom: 10px;
            border: none;
            border-bottom: 1px solid #eee;
        }
        .pagination-container {
            text-align: center;
            clear: both;
        }
        .layout-body, .layout-side {
            padding: 0 5px;
        }
        .breadcrumb {
            margin: 0;
            padding: 10px 0;
            font-size: 13px;
            background: transparent;
            border-radius: 0;
        }
        .breadcrumb li a {
            color: #666;
        }
        .question-detail {
            background: #fff;
            padding: 30px;
            margin-bottom: 15px;
            box-shadow: 0 1px 1px #ccc;
        }
        .question-headline .question-title {
            font-size: 20px;
            font-weight: 800;
            word-break: break-all;
            width: 650px;
            color: #484e54;
        }
        .question-headline .question-figure {
            float: right;
            margin-right: 20px;
            padding-top: 5px;
            color: #666;
            font-size: 14px;
        }
        .question-headline .question-figure {
            float: right;
            margin-right: 20px;
            padding-top: 5px;
            color: #666;
            font-size: 14px;
        }
        .question-author {
            margin-top: 16px;
            font-size: 13px;
        }
        .user-avatar {
            position: relative;
            display: inline-block;
        }
        .user-username {
            display: inline-block;
        }
        .question-author span {
            margin-right: 30px;
        }
        .btn {
            border-radius: 0;
        }
        .question-content {
            margin-top: 20px;
            margin-bottom: 40px;
        }
        .question-answers {
            padding-bottom: 50px;
        }
        .ptilte {
            font-size: 18px;
            color: #666;
            padding-bottom: 6px;
        }
        .answer-item {
            margin-top: 30px;
        }
        .answer-head {
            float: left;
            width: 40px;
            margin-right: 10px;
            margin-top: 5px;
        }
        .user-avatar {
            position: relative;
            display: inline-block;
        }
        .user-avatar .member-icon {
            position: absolute;
            bottom: 1%;
            right: 3%;
            width: 32%;
        }
        .answer-detail {
            position: relative;
            margin-left: 55px;
            padding-bottom: 5px;
        }
        .answer-content {
            margin: 5px 0 10px;
            font-size: 15px;
            color: #484e54;
            word-wrap: break-word;
        }

        element.style {
        }
        .answer-content {
            margin: 5px 0 10px;
            font-size: 15px;
            color: #484e54;
            word-wrap: break-word;
        }
        .markdown-body {
            -ms-text-size-adjust: 100%;
            -webkit-text-size-adjust: 100%;
            color: #333;
            font-size: 16px;
            line-height: 1.6;
            word-wrap: break-word;
        }
        .footer {
            padding-top: 20px;
            background: #191e29;
        }
        .footer-col .col-title {
            font-size: 14px;
            margin-bottom: 10px;
            color: hsla(0,0%,100%,.5);
        }
        .footer-col a {
            display: inline-block;
            margin-bottom: 3px;
            color: hsla(0,0%,100%,.5);
        }
    </style>
</head>
<body>
<a type="button" class="btn btn-outline-info" th:href="@{/user/getArticle}">返回</a>
<div class="container layout layout-margin-top">
    <div class="row">
        <div class="col-md-12 layout-body">
            <div class="content question-detail">
                <div class="question-headline">
                    <span class="question-title">[[${article.articleTitle}]]</span>
                </div>
                <div class="question-author">
                    <div class="user-avatar ">
                        <a class="avatar"  target="_blank">
                            <img  th:src="${article.userHeadphoto}">
                        </a>
                    </div>
                    <div class="user-username ">
                        <a class="username"  target="_blank">[[${article.userNickname}]]</a>
                    </div>
                    <span>[[${#dates.format(article.articleTime,'yyyy-MM-dd hh:mm')}]]</span>

                </div>
                <div class="question-content markdown-body">
                    <p><span th:utext="${article.articleContent}"></span></p>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript">
    const E = window.wangEditor;
    const editor = new E("#toolbar-container", "#text-container");
    const $text = $('#container');
    editor.config.menus = [
        'bold', // 粗体
        'italic', // 斜体
        'link', // 插入链接
        'emoticon', // 表情
    ];
    editor.config.onchange = function (html) {
        // 第二步，监控变化，同步更新到 textarea
        $text.val(html)
    }
    editor.create()
    // 第一步，初始化 textarea 的值
    $text.val(editor.txt.html())
</script>